public class DOme3 {
    public static void main(String[] args) {
        new Thread(){
            public void run() {
                for (int i = 0; i < 5; i++) {
                    System.out.println("继承 Thread, 重写 run, 使用匿名内部类");
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        }.start();
        System.out.println("main线程结束");
    }
}
